package cn.edu.lcu.cs.designpattern.state.trafficlight.state;

public class GreenState extends TrafficState {
    public GreenState(TrafficLight light) {
        super("绿色", 30, light);
    }

    @Override
    public void change() {
        display();
        countdown--;
        if (countdown==0) {
            light.setState(new YellowState(light));
        }
     }


}
